//package com.waste.game.service.impl;
//
//import com.github.pagehelper.Page;
//import com.github.pagehelper.PageHelper;
//import com.github.pagehelper.PageInfo;
//import com.waste.game.entity.GameListBean;
//import com.waste.game.entity.WantBean;
//import com.waste.game.mapper.GameListMapper;
//import com.waste.game.service.GameListService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//
//import java.util.List;
//
//@Service
//public class GameListServiceImpl implements GameListService {
//
//    @Autowired
//    private GameListMapper gameListMapper;
//    //查询所有
//    @Override
//    public List<GameListBean> getIndexGame(){
//        return gameListMapper.getIndexGame();
//    }
//    //独立点击前6
//    @Override
//    public List<GameListBean> getDlLookGame(){
//        return gameListMapper.getDlLookGame();
//    }
//    //pc点击前6
//    @Override
//    public List<GameListBean> getPcLookGame(){
//        return gameListMapper.getPcLookGame();
//    }
//    //查询所有分页
//    @Override
//    public PageInfo<GameListBean> getAllPage(Integer pageNum, Integer pageSize){
//        //分页实现
//        Page<Object> objects = PageHelper.startPage(pageNum,pageSize);
//        List<GameListBean> gameListBeans = gameListMapper.getIndexGame();
//        PageInfo<GameListBean> pageInfo = new PageInfo<>(gameListBeans);
//        return pageInfo;
//    }
//    //查询所有分页
//    @Override
//    public PageInfo<GameListBean> getGameSea(String title , Integer pageNum, Integer pageSize){
//        //分页实现
//        Page<Object> objects = PageHelper.startPage(pageNum,pageSize);
//        List<GameListBean> gameListBeans = gameListMapper.getGameSearch(title);
//        PageInfo<GameListBean> pageInfo = new PageInfo<>(gameListBeans);
//        return pageInfo;
//    }
//    //根据id查询文章
//    @Override
//    public GameListBean getGameArt(Integer id){
//        return gameListMapper.getGameArt(id);
//    }
//    //根据id查询对应图片
////    @Override
////    public List<GameListBean> getImgList(Integer id){
////        return gameListMapper.getImgList(id);
////    }
//    //pcgame查询
//    @Override
//    public List<GameListBean> getPcGameList(){
//        return gameListMapper.getPcGameLIst();
//    }
//    //pcgame分页
//    @Override
//    public PageInfo<GameListBean> getPcGamePage(Integer pageNum, Integer pageSize){
//        //分页实现
//        Page<Object> objects = PageHelper.startPage(pageNum,pageSize);
//        List<GameListBean> gameListBeans = gameListMapper.getPcGameLIst();
//        PageInfo<GameListBean> pageInfo = new PageInfo<>(gameListBeans);
//        return pageInfo;
//    }
//    //indexgame查询
//    @Override
//    public List<GameListBean> getIndexGameList(){
//        return gameListMapper.getIndexGameLIst();
//    }
//    //indexgame分页
//    @Override
//    public PageInfo<GameListBean> getIndexGamePage(Integer pageNum, Integer pageSize){
//        //分页实现
//        Page<Object> objects = PageHelper.startPage(pageNum,pageSize);
//        List<GameListBean> gameListBeans = gameListMapper.getIndexGameLIst();
//        PageInfo<GameListBean> pageInfo = new PageInfo<>(gameListBeans);
//        return pageInfo;
//    }
//    //后台添加文章数据部分
////    @Override
////    public boolean insertOne(GameListBean gameListBean){
////        return gameListMapper.insertOne(gameListBean);
////    }
//    @Override
//    public int insertOneBig(GameListBean gameListBean){
//        return gameListMapper.insertOneBig(gameListBean);
//    }
//    //文章图片插入
//    @Override
//    public int insertTwo(GameListBean gameListBean){
//        return gameListMapper.insertTwo(gameListBean);
//    }
//    //文章标题插入
//    @Override
//    public int insertThree(GameListBean gameListBean){
//        return gameListMapper.insertThree(gameListBean);
//    }
//    //后台查询
//    @Override
//    public List<GameListBean> getList(){
//        return gameListMapper.getList();
//    }
//    //后台分页
//    @Override
//    public PageInfo<GameListBean> getListPage(Integer pageNum, Integer pageSize){
//        //分页实现
//        Page<Object> objects = PageHelper.startPage(pageNum,pageSize);
//        List<GameListBean> gameListBeans = gameListMapper.getList();
//        PageInfo<GameListBean> pageInfo = new PageInfo<>(gameListBeans);
//        return pageInfo;
//    }
//    //获取文章id
//    @Override
//    public int getArtId(String gameTitle){
//        return gameListMapper.getArtId(gameTitle);
//    }
//    //循环添加数据，低能方法
//    @Override
//    public void fordown(List<GameListBean> gameListBeans){
//        for (GameListBean ben : gameListBeans){
//            gameListMapper.instDown(ben);
//        }
//    }
//    //游戏名提交
//    @Override
//    public int gameWant(WantBean wantBean){
//        return gameListMapper.gameWant(wantBean);
//    }
//    //下载列表分页
//    @Override
//    public PageInfo<GameListBean> getDownListV(Integer pageNum, Integer pageSize){
//        //分页实现
//        Page<Object> objects = PageHelper.startPage(pageNum,pageSize);
//        List<GameListBean> gameListBeans = gameListMapper.getDownListV();
//        return new PageInfo<>(gameListBeans);
//    }
//}
